#ifndef DISTRIBUTEDCLIENT_H_
#define DISTRIBUTEDCLIENT_H_

#include <string>
#include "../PracticalSocket/PracticalSocket.h"

#define BUFFER_SIZE 4096

enum DistributedClientState {AWAITING_JOB, AWAITING_START_CONFIRMATION, AWAITING_RECIEPT_CONFIRMATION};

class DistributedClient {
    public:
        DistributedClient(string serverAddress, unsigned short serverPort, unsigned short incomingPort);
        void go();
    private:
        string serverAddress;
        unsigned short serverPort;
        unsigned short incomingPort;
        DistributedClientState state;
        UDPSocket socket;
        Packet packet;
        char buffer[BUFFER_SIZE];
        int bufferLength;
};

#endif /*DISTRIBUTEDCLIENT_H_*/
